﻿using System;
using CRM.Models.Email;

namespace CRM.ViewModels.Email
{
    public class EmailConfigGroupVM
    {
        public int Id { get; set; }
        
        public int OemId { get; set; }

        public int CompanyId { get; set; }
  
        public int GroupId { get; set; }

        public int UserId { get; set; }

        public string Name { get; set; }

        public EmailConfigGroup NewModel(Models.User user)
        {
            return new() {
                OemId = user.OemId,
                CompanyId = user.CompanyId,
                GroupId = user.GroupId,
                UserId = user.Id,
                Name = Name,
                CreatedAt = DateTime.Now
            };
        }
    }
}